Skip to content

feat: commands の旧モデル儀式を成果指向に書換(#114、v0.64.0)#129

Merged
okash1n merged 1 commit into
mainfrom
issue/114-commands-rewrite
Jun 12, 2026
Merged

feat: commands の旧モデル儀式を成果指向に書換(#114、v0.64.0)#129
okash1n merged 1 commit into
mainfrom
issue/114-commands-rewrite

Conversation

@okash1n

@okash1n okash1n commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

概要

LLM 性能監査計画 #121 の P3-08(#114)。旧モデルの暴走防止・手抜き対策として書かれた固定手順 5 件を成果指向に書き換える。

変更内容

  • orchestrate: 固定 4 エージェント直列チェーン・定型 HANDOFF 文書・35 行固定レポートテンプレートを廃止。既定は「メインスレッドで計画・実装・検証 → 実装後に code-reviewer(必須)/ security-reviewer / architect を並列 spawn」。タスク種別チェーンはレビュー観点リストに格下げ。custom エスケープハッチは維持し、直列時の引き継ぎは「1 段落の要約」とだけ規定
  • build-fix: エラー 1 件ごとのフルビルド再実行を、根本原因ごとのバッチ修正 + 最速検証(tsc --noEmit 等)+ 最後にフルビルド 1 回へ。npm/pnpm ハードコードをビルドコマンド検出に一般化。停止条件(3 回ルール・ユーザー停止)は保険として維持
  • refactor-clean: 削除 1 件ごとの前後フルテストを、green ベースライン → SAFE バッチ適用(削除単位コミット)→ focused tests → 最後にフル 1 回 → 失敗時バイセクトへ。ツール一般化(JS/TS / Python / Go / shell)。SAFE/CAUTION/DANGER と最終ガードレールは維持
  • learn: 出力を現行スキル発見機構準拠の ~/.claude/skills/learned/<pattern-name>/SKILL.md + YAML frontmatter(when_to_use は規約どおり Use when ... 形式)に修正。auto-memory との棲み分けを Notes に明記
  • update-docs: RUNBOOK 生成を「実在する運用ソースがある場合のみ・導出可能なセクションのみ。ソースのないセクションは省略して不足を報告」に限定。矛盾していた single-source 宣言を実際のソース集合に修正

検証

  • unit 342/342 / scenarios 44 Pass + 1 Skip / shellcheck green(シェル変更なし)
  • 内部レビュー(code-reviewer agent): medium 1 件(when_to_use プレースホルダが Use when... 規約と不整合)+ low 2 件 → when_to_use 形式と CAUTION 例示の言語中立化を修正済み。残り 1 件(learned スキルは CI のfrontmatter 検査対象外)は既存の構造的制約として記録

Closes #114

- orchestrate: 固定 4 エージェント直列 + HANDOFF/レポートテンプレ廃止 → メインスレッド実装 + 並列レビュー
- build-fix: per-error フルビルド → 根本原因バッチ + 最速検証 + 最後にフル 1 回
- refactor-clean: per-deletion 前後フルテスト → baseline + バッチ + focused tests + バイセクト
- learn: 出力を <pattern>/SKILL.md + frontmatter(Use when... 形式)に修正、auto-memory 棲み分け明記
- update-docs: RUNBOOK 生成を実在ソース条件付きに(捏造防止)

Closes #114
Copilot AI review requested due to automatic review settings June 12, 2026 02:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes several /commands/* docs by removing legacy “fixed ritual” workflows aimed at older LLM limitations and rewriting them into outcome-oriented guidance aligned with current Claude Code behavior and the kit’s review/guardrail conventions.

Changes:

  • Rewrites /orchestrate to prefer main-thread execution + parallel independent reviewers, removing fixed agent relay chains and handoff/report templates.
  • Rewrites /build-fix and /refactor-clean to favor root-cause batching, fast checks / focused tests, and a single final full verification step.
  • Updates /learn to emit learned skills in .../<pattern-name>/SKILL.md with YAML frontmatter; tightens /update-docs to derive RUNBOOK sections only from real operational sources; adds a v0.64.0 changelog entry and adjusts unit tests accordingly.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
commands/orchestrate.md Removes fixed sequential agent chains/templates; documents parallel review spawning and minimal custom chaining handoff.
commands/build-fix.md Switches guidance from per-error rebuild loops to root-cause batching + fastest verification + one final full build.
commands/refactor-clean.md Replaces per-deletion full-suite ritual with baseline → batch SAFE deletions → focused tests → final full suite + bisect guidance.
commands/learn.md Updates learned skill output to directory + SKILL.md + YAML frontmatter; clarifies auto-memory vs explicit skill promotion.
commands/update-docs.md Limits RUNBOOK generation to sections derivable from real ops sources; generalizes task-definition source detection.
tests/unit/test-content-cleanup.sh Updates assertions to match new /orchestrate wording (no fixed chains; parallel reviewers).
tests/unit/test-doc-blocker.sh Updates allowed learned-skill path example to nested .../pattern/SKILL.md.
CHANGELOG.md Adds release notes for 0.64.0 describing the command rewrites.

Comment thread commands/orchestrate.md
Comment on lines 7 to 10
## Usage

`/orchestrate [workflow-type] [task-description]`

Comment thread commands/build-fix.md

5. Stop if:
- The error count is increasing, or fixes are going in circles
- Same error persists after 3 attempts
Comment thread commands/update-docs.md
1. Detect the project's task definition source (package.json scripts,
Makefile, pyproject.toml, etc.)
- Generate a scripts/tasks reference table
- Include descriptions from comments
Comment on lines +18 to +19
- Apply SAFE deletions as a batch, one commit per deletion or logical
group (easy rollback)
@okash1n okash1n merged commit 8375127 into main Jun 12, 2026
12 checks passed
@okash1n okash1n deleted the issue/114-commands-rewrite branch June 12, 2026 02:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 594619fbbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread commands/learn.md
Comment on lines +36 to +38
Create a skill at `~/.claude/skills/learned/<pattern-name>/SKILL.md` so the
current skill discovery mechanism (directory + SKILL.md with YAML
frontmatter) can load it:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Save learned skills at the discovered skill level

When users follow /learn, this path creates ~/.claude/skills/learned/<pattern-name>/SKILL.md, i.e. a grouping directory under the personal skills root rather than a skill directory directly under it. Claude Code documents personal skills as ~/.claude/skills/<skill-name>/SKILL.md (https://docs.claude.com/en/docs/claude-code/skills), and the repo's shipped skills all follow that layout, so the generated learned patterns can remain undiscovered/unloaded despite this command saying they are activatable skills. Use a top-level skill directory such as ~/.claude/skills/<pattern-name>/SKILL.md or add a discovery-compatible indexing strategy.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P3-08] commands の旧モデル儀式を成果指向に書換(orchestrate / build-fix / refactor-clean / learn / update-docs)

2 participants